﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Shove.Web.UI;

public partial class UserControls_AboutUs : UCBase
{
    public UserControls_AboutUs()
    {
        Name = "关于我们";

        //swpas = new ShoveWebPartAttribute[24];

        //swpas[0] = new ShoveWebPartAttribute_Int("控件宽度", "1,1000", 180, "控件宽度");
        //swpas[1] = new ShoveWebPartAttribute_Int("导航高度", "1,300", 23, "导航高度");
        //swpas[2] = new ShoveWebPartAttribute_Int("导航背景图片单元格宽度", "1,600", 106, "导航背景图片单元格宽度");
        //swpas[3] = new ShoveWebPartAttribute_Int("关于我们行宽度", "1,1000", 170, "关于我们行宽度");
        //swpas[4] = new ShoveWebPartAttribute_Int("关于我们单元格宽度", "1,600", 160, "关于我们单元格宽度");

        //swpas[5] = new ShoveWebPartAttribute_Text("导航字体CSS样式", "", "td14", "导航字体CSS样式");
        //swpas[6] = new ShoveWebPartAttribute_Text("关于我们CSS样式", "", "black12", "关于我们CSS样式");

        //swpas[7] = new ShoveWebPartAttribute_Image("导航背景图片1", "", "images/title_bg_4.jpg", "导航背景图片1");
        //swpas[8] = new ShoveWebPartAttribute_Image("导航背景图片2", "", "images/title_bg_hui3.jpg", "导航背景图片2");
        //swpas[9] = new ShoveWebPartAttribute_Image("分割线图片", "", "images/category_bg_2.jpg", "分割线图片");
        //swpas[10] = new ShoveWebPartAttribute_Image("标题前小图片", "", "images/point_bg.jpg", "标题前小图片");

        //swpas[11] = new ShoveWebPartAttribute_Color("控件边框颜色", "#cccccc", "控件边框颜色");

        //swpas[12] = new ShoveWebPartAttribute_Int("关于我们行高", "1,400", 26, "关于我们行高");
        
        ////右边详细的属性
        //swpas[13] = new ShoveWebPartAttribute_Int("右边详细表格宽度", "1,1000", 759, "右边详细表格宽度");
        //swpas[14] = new ShoveWebPartAttribute_Int("右边导航高度", "1,300", 23, "右边导航高度");
        //swpas[15] = new ShoveWebPartAttribute_Int("右边导航背景图片单元格宽度", "1,600", 139, "右边导航背景图片单元格宽度");
        //swpas[16] = new ShoveWebPartAttribute_Int("我们的宗旨行高", "1,300", 23, "我们的宗旨行高");

        //swpas[17] = new ShoveWebPartAttribute_Image("右边导航背景图片1", "", "images/bg_gold_23.jpg", "右边导航背景图片1");
        //swpas[18] = new ShoveWebPartAttribute_Image("右边导航背景图片2", "", "images/bg_gold_23_2.jpg", "右边导航背景图片2");

        //swpas[19] = new ShoveWebPartAttribute_Color("右边详细表格边框颜色", "#E7C890", "右边详细表格边框颜色");

        //swpas[20] = new ShoveWebPartAttribute_Text("右边导航字体样式", "", "td14", "右边导航字体样式");
        //swpas[21] = new ShoveWebPartAttribute_Text("关于我们详细内容样式", "", "black12", "关于我们详细内容CSS样式");
        //swpas[22] = new ShoveWebPartAttribute_Text("我们的宗旨样式", "", "black12", "我们的宗旨样式");
        //swpas[23] = new ShoveWebPartAttribute_Text("联系我们样式", "", "black12", "联系我们小标题样式");
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        InitlayOut();
        BindData();
    }

    private void InitlayOut()
    {
        //tabctr.Width = swpAttributes[0];
        //tabctr.BgColor = swpAttributes[11];

        //tdhelp.Height = swpAttributes[1];
        //tdhelp.Attributes.Add("class", swpAttributes[5]);
        //tdhelp.Style.Add("background-image", "url('" + swpAttributes[7] + "')");
        //tdhelp.Width = swpAttributes[2];

        //tdspace.Style.Add("background-image", "url('" + swpAttributes[8] + "')");
        //tdspace.Width = (Shove._Convert.StrToInt(swpAttributes[0], 180) - Shove._Convert.StrToInt(swpAttributes[2], 106)).ToString();

        //tab1.Width = swpAttributes[3];
        //tab1.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        //imgpoint.Src = "~/" + swpAttributes[10];
        //tdAboutUs.Height = swpAttributes[12];
        //tdAboutUs.Attributes.Add("class", swpAttributes[6]);
        //tdAboutUs.Width = swpAttributes[4];

        //tab2.Width = swpAttributes[3];
        //tab2.Style.Add("background-image", "url('" + swpAttributes[9] + "')");
        //imgpoint1.Src = "~/" + swpAttributes[10];
        //tdlinkUS.Height = swpAttributes[12];
        //tdlinkUS.Attributes.Add("class", swpAttributes[6]);
        //tdlinkUS.Width = swpAttributes[4];

        ////右边属性
        //tabctr1.Width = swpAttributes[13];
        //tabctr1.BgColor = swpAttributes[19];

        //tdrightSign.Height = swpAttributes[14];
        //tdrightSign.Width = swpAttributes[15];
        //tdrightSign.Style.Add("background-image", "url('" + swpAttributes[17] + "')");
        //tdrightSign.Attributes.Add("class", swpAttributes[20]);

        //tdrightspace.Style.Add("background-image", "url('" + swpAttributes[18] + "')");
        //tdrightspace.Width = (Shove._Convert.StrToInt(swpAttributes[13], 759) - Shove._Convert.StrToInt(swpAttributes[15], 139)).ToString();

        //lbAboutUs.CssClass = swpAttributes[21];

        //tdTarget.Height = swpAttributes[16];
        //tdTarget.Attributes.Add("class", swpAttributes[23]);
        //tdTargetContent.Attributes.Add("class", swpAttributes[22]);

        //tdlink.Height = swpAttributes[16];
        //tdlink.Attributes.Add("class", swpAttributes[23]);

        //tdtel.Height = swpAttributes[16];
        //tdtel.Attributes.Add("class", swpAttributes[22]);

        //tdemail.Height = swpAttributes[16];
        //tdemail.Attributes.Add("class", swpAttributes[22]);

        //tdcode.Height = swpAttributes[16];
        //tdcode.Attributes.Add("class", swpAttributes[22]);

        //tdaddress.Height = swpAttributes[16];
        //tdaddress.Attributes.Add("class", swpAttributes[22]);
    }

    /// <summary>
    /// 加载数据
    /// </summary>
    private void BindData()
    {
        this.hType.Value = Shove._Web.Utility.GetRequest("Type");//type有联系我们，关于我们
        
        if (this.hType.Value == "link_us")
        {
            lbTitle.Text = "联系我们";

            labContent.Text = PublicFunction.GetOptionsBin("联系我们");
        }
        else if(this.hType.Value == "about_us")
        {
            lbTitle.Text = "关于我们";

            labContent.Text = PublicFunction.GetOptionsBin("关于我们");
        }
    } 

}
